Skip to content

feat(table): add column picker to TanStack table toolbar#8399

Open
LWS49 wants to merge 1 commit into
masterfrom
lws49/feat-table-column-picker
Open

feat(table): add column picker to TanStack table toolbar#8399
LWS49 wants to merge 1 commit into
masterfrom
lws49/feat-table-column-picker

Conversation

@LWS49
Copy link
Copy Markdown
Collaborator

@LWS49 LWS49 commented May 21, 2026

Summary

Adds the column picker infrastructure to the shared table library - a dialog that lets users select which columns to include before exporting CSV. The feature is implemented but not yet wired to any table; the next PR will integrate it with the statistics tables.

The PR also moves IndentedCheckbox to lib/components/core/as it is used by the column picker tree beyond the existing duplication bundle.

Design decisions

  • Export uses staged visibility, not table state - onExportFromPicker now receives the enforced visibility map from the dialog instead of being a no-arg thunk. This makes the CSV pipeline independent of when React flushes the state update.

Regression prevention

Tests cover: column picker dialog (staged state, locked columns, identifiers guard), ColumnPickerTreeGroup tree rendering and bulk selection, CSV generator with and without visibilityOverride, useTanStackTableBuilder column visibility state and CSV download (including the indices: true offset case), toolbar Export button rendering.

Manual testing confirmed no regression in existing CSV download: student statistics CSV downloads correctly with no active search and with a search filter applied; assessment statistics CSV downloads with no columns selected and with all columns selected.

Backward compatibility fully preserved - columnPicker is opt-in on TableTemplate; all existing tables are unaffected.

@LWS49 LWS49 force-pushed the lws49/feat-table-column-picker branch 3 times, most recently from eddc2d0 to df5727b Compare May 21, 2026 06:50
@LWS49 LWS49 changed the title refactor(table): add columnPicker functionality feat(table): add column picker to TanStack table toolbar May 21, 2026
@LWS49 LWS49 force-pushed the lws49/feat-table-column-picker branch 2 times, most recently from b81cc05 to 5176703 Compare May 21, 2026 07:23
@LWS49 LWS49 marked this pull request as ready for review May 21, 2026 11:53
@LWS49 LWS49 force-pushed the lws49/feat-table-column-picker branch 5 times, most recently from 1da9168 to 9eb203a Compare May 25, 2026 03:46
…alog, toolbar buttons, visibility state, and tests

    - Add MuiColumnPickerDialog with Apply/Export actions, locked-column enforcement, and optional dataColumnIds hint when no data columns are selected
    - Update MuiTableToolbar to render a trigger button (opens dialog) and a direct export button alongside the existing CSV download icon
    - Extend useTanStackTableBuilder with column visibility state (localStorage persistence, dynamic reconciliation), onExportFromPicker, onDirectExport, and cross-page selection helpers (selectedCount, toggleAllFiltered, etc.)
    - Add ColumnPickerTemplate interface and Body.ts selection fields
    - Add full test coverage for dialog, toolbar, and hook behaviour
    - Add lib.components.table.* locale keys (en/ko/zh)
@LWS49 LWS49 force-pushed the lws49/feat-table-column-picker branch from 9eb203a to 58ef551 Compare May 25, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant